/*
 * @Author: stark
 * @Date: 2022-06-20 19:57:36
 */
$(function () {
    let id = $.getUrlParam('id');
    $.get(baseUrl + '/goods/lists', data = { categoryId: id }, response => {
        let result = response.data;
        let html = '';
        result.forEach(item => {
            html += `
            <li>
                    <a href="detail.html?id=${item.id}">
                        <img src="${item.goodsThumb}" alt="">
                        <h3>${item.goodsName}</h3>
                        <p>￥${item.shopPrice}<span>￥${item.marketPrice}</span></p>
                        <button type="button">立即抢购</button>
                    </a>
            </li>`
        })
        $(".sk_bd ul").html(html);
    });
})